package com.shenmazong.servereduuser.entity;


import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 学院表——suliven
 * @TableName tb_collage
 */
@TableName(value ="tb_collage")
@Data
public class TbCollage implements Serializable {
    /**
     * 学院ID
     */
    @TableId
    private Long collageId;

    /**
     * 学院名称
     */
    private String collageName;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 软删除
     */
    @TableLogic
    private Byte deleteFlag;

    /**
     * 学院编号  类似（1001）
     */
    private Integer collageNo;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbCollage other = (TbCollage) that;
        return (this.getCollageId() == null ? other.getCollageId() == null : this.getCollageId().equals(other.getCollageId()))
            && (this.getCollageName() == null ? other.getCollageName() == null : this.getCollageName().equals(other.getCollageName()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleteFlag() == null ? other.getDeleteFlag() == null : this.getDeleteFlag().equals(other.getDeleteFlag()))
            && (this.getCollageNo() == null ? other.getCollageNo() == null : this.getCollageNo().equals(other.getCollageNo()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCollageId() == null) ? 0 : getCollageId().hashCode());
        result = prime * result + ((getCollageName() == null) ? 0 : getCollageName().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleteFlag() == null) ? 0 : getDeleteFlag().hashCode());
        result = prime * result + ((getCollageNo() == null) ? 0 : getCollageNo().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", collageId=").append(collageId);
        sb.append(", collageName=").append(collageName);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", deleteFlag=").append(deleteFlag);
        sb.append(", collageNo=").append(collageNo);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}